package day14.tarena.com;

public class Cat implements Comparable<Cat>{
	private int id;
	private String name;
	
	
	public int compareTo(Cat c) {
		if(c == null ){
			return 0;
		}
		return this.name.compareTo(c.name);
	}
	
	public Cat() {
		super();
	}
	public Cat(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String toStirng(){
		return id+":"+name;
	}
}
